<template>
	<view class="bg-white">
		<cu-custom bgColor="bg-white" :isBack="true">
			<block slot="content">历史员工档案详情</block>
			<!-- <block slot="right">
				<button class="cu-btn bg-red shadow" @click="urging">催办</button>
			</block> -->
		</cu-custom>
		<view style="padding: 15px">
			<!-- <view style=" background-color: #f3f5fc; border-radius: 10px;padding: 15px 10px; position: relative;">
				<text style="color: #4591fe; font-weight: 400; font-size: 12px">
					创建日期：{{ dataObj.createTime }}
				</text>

			</view> -->

			<view style="margin-top: 20px">

				<view class="action"
					style="margin-bottom: 10px;text-align: center;background-color: #f3f5fc; border-radius: 10px;padding: 15px 10px; position: relative;">
					<text style="color: #000000; font-weight: bold; font-size: 30rpx;">
						{{ dataObj.workNo }}—{{ dataObj.realname }}
					</text>
				</view>
				<view class="action" style="margin-top: 10px">
					<text class="cuIcon-titles" style="color: #1e5eff"></text>
					<text style="color: #000000; font-weight: bold; font-size: 30rpx">
						基本资料
					</text>
				</view>
				<!-- <view style=" margin-top: 10px;background-color: #f9f9f9;border-radius: 10px;padding: 15px 25px;">
					<view style="display: flex">

						<span
							style="margin-left: 15px; color: #101317; font-weight: 500">姓名：{{ dataObj.realname }}</span>

					</view>
					<view style="display: flex">

						<span style="margin-left: 15px; color: #101317; font-weight: 500">工号：{{ dataObj.workNo }}</span>

					</view>
					<view style="display: flex">

						<span
							style="margin-left: 15px; color: #101317; font-weight: 500">性别：{{ dataObj.sex_dictText }}</span>

					</view>

					<view style="display: flex">

						<span
							style="margin-left: 15px; color: #101317; font-weight: 500">学历：{{ dataObj.education }}</span>

					</view>

					<view style="display: flex; margin-top: 15px">

						<span
							style="margin-left: 15px; color: #101317; font-weight: 500">毕业院校：{{ dataObj.graduationInstitution }}</span>

					</view>
					<view style="display: flex; margin-top: 15px">

						<span
							style="margin-left: 15px; color: #101317; font-weight: 500">厂牌打印次数：{{ dataObj.printFactoryCardNum }}</span>

					</view>

				</view> -->
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						公司
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						<view
							style=" background-color: #e1ebfa; padding: 5px 10px;margin-top: -5px; width: 120px; border-radius: 2px;">
							<image src="@/static/images/gongsi.png" style="width: 12px;height: 12px;margin-right: 5px;">
							</image>
							<text style="color: #101317; font-size: 13px; font-weight: 500">
								{{ dataObj.company_dictText }}
							</text>
						</view>
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						备份原因
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.backupsReason }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						身份类别
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.identityCategory_dictText }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						姓名
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.realname }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						性别
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.sex_dictText }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						身份证号
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.idCard }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						入职时间
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.proposedEmploymentDate != null ? dataObj.proposedEmploymentDate.replace(/-/g, "/") : null}}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						工号
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.workNo }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						联系电话
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.phone }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						年龄
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.age }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						籍贯
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.nativePlace }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						民族
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.nation }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						出生年月
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.birthday != null ? dataObj.birthday.replace(/-/g, "/"): null }}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						党团员
					</view>
					<view class="flex-sub padding-sm margin-xs radius" style="color: #4591FE;">
						{{dataObj.partyAndLeagueMembers_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						婚姻状态
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.maritalStatus_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						学历
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.education_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						毕业院校
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.graduationInstitution}}
					</view>
				</view>

				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						工龄
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.seniority }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						分类
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.classification }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						部门
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.departIds_dictText }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						部门编码
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.departName }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						车间
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.workshop }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						班次
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.classes }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						岗位
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.post }}
					</view>
				</view>


				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						合同结束时间
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						<!-- {{dataObj.contractEndTime}} -->
						{{ dataObj.contractEndTime != null ? dataObj.contractEndTime.replace(/-/g, "/"): null}}
					</view>

				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						用户id
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.id }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						职位等级
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.proficiency_dictText }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						熟练程度
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.postType_dictText }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						熟练等级
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.proficiencyLevel_dictText }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						计费标准
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.freightBasis }}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						现居住地址
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.currentAddress}}
					</view>
				</view>
				<view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						房间号
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.roomCode}}

					</view>
				</view>

				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						厂牌打印次数
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.printFactoryCardNum}}
					</view>
				</view>
				<view style=" background-color: #f3f5fc; border-radius: 10px;padding: 15px 10px; position: relative;">
					<text style="color: #4591fe; font-weight: 400; font-size: 12px">
						创建日期：{{ dataObj.createTime }}
					</text>

				</view>
				<!-- <view class="flex" style="width: 300px">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						创建时间
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{ dataObj.createTime != null ? dataObj.createTime.replace(/-/g, "/"): null}}
					</view>

				</view> -->
			</view>



		</view>
	</view>
</template>

<script>
	import moment from "moment";
	export default {
		data() {
			return {
				createTime: "2023/10/10 12:00",
				renewalTime: "10天",
				retireTime: "235天",
				dataObj: {},
				dataObj2: {

				},
				approvalRecords: [{
					title: "总经理",
					name: "陈婷婷",
					area: "手写区域",
					state: "同意",
					manager: "企管",
					dateTime: "2023/10/10 12:00",
				}, ],
			};
		},
		onLoad: function(options) {
			this.dataObj.id = options.id;
			// const listObjItem = JSON.parse(options.listObj);
			// this.dataObj = listObjItem
			// 在这里可以使用获取到的 id 参数进行后续操作
		},
		mounted() {
			this.getDetail();
		},
		computed: {},
		methods: {
			getDetail() {
				let params = {
					id: this.dataObj.id,

				};
				this.$http
					.get("/sys/user/list/", {
						params: params,
					})
					.then((res) => {
						if (res.data.success) {
							this.dataObj = res.data.result.records[0];
							// this.dataObj['avatar'] = this.getFileAccessHttpUrl(this.dataObj['avatar'])
							// console.log(this.dataObj['avatar'])
							//this.approvalRecords = this.dataObj.approvalRecords;
						}
					});
			},
			urging(id) {
				const params = {
					applicationId: id,
					approvalType: 1,
				};
				this.$http
					.get("/crm_on_hand/crmOnHand/urge", {
						params: params,
					})
					.then((res) => {
						if (res.data.success) {
							this.$refs.urgingPopup.open("center");
						}
					});
			},
			reUpload() {
				console.log("重新上传");
			},
		},
	};
</script>

<style>
	.cu-form-group {
		background-color: #ffffff;
		line-height: 15px;
		padding: 0.5px 15px;
		display: flex;
		align-items: center;
		min-height: 42px;
		justify-content: space-between;
	}

	.cu-form-group uni-picker .picker {
		line-height: 15px;
		font-size: 15px;
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
		width: 100%;
		text-align: right;
	}

	.cu-form-group uni-picker::after {
		font-family: cuIcon;
		line-height: 15px;
		display: block;
		content: "\e6a3";
		position: absolute;
		font-size: 17px;
		color: #8799a3;
		width: 31px;
		text-align: center;
		top: 0;
		bottom: 0;
		right: -10px;
		margin: auto;
	}

	/deep/ .uni-radio-input {
		width: 15px;
		height: 15px;
	}

	.nav-right-image {
		width: 40rpx;
		height: 40rpx;
		margin-left: 15px;
	}

	.padding-sm {
		padding: 5px;
	}

	.textStyle {
		font-size: 13px;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		color: #101317;
		line-height: 22px;
	}
</style>